<?php namespace App\Exceptions;

use Exception;

class YiLiaoException extends Exception
{
    const CanSelectTheTime = 0x01;

    public function __construct($code, array $data = [], Exception $previous = null)
    {
        switch ($code) {
            case self::CanSelectTheTime:
                $message = trans('医生休诊，请选择其他时间！', []);
                break;
            default:
                $message = trans('未知错误');
                break;
        }

        parent::__construct($message, $code, $previous);
    }

}